package com.androidviewshape;

import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.viewshape.view.ShapeButton;
public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_layout);
        ShapeButton button = findViewById(R.id.btn_main_test);
        button.setOnClickListener(v -> {
            button.getShapeDrawableBuilder()
                    .setSolidColor(-0x1000000)
                    .setStrokeColor(-0xa57221)
                    .intoBackground();
            button.getTextColorBuilder()
                    .setTextColor(-0x1)
                    .intoTextColor();
            button.setText("颜色已经改变啦");
        });
    }
}
